package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.model.CouponRecordDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author LinN
 * @since 2022-09-29
 */
public interface CouponRecordMapper extends BaseMapper<CouponRecordDO> {

    /**
     * 批量更新优惠券使用记录
     */
    int insertLockUseStateBatch(@Param("userId") Long userId, @Param("useState") String useState,@Param("couponRecordIds") List<Long> couponRecordIds);

    void updateState(@Param("couponRecordId") Long couponRecordId, @Param("useState") String useState);
    CouponRecordDO findById2(@Param("id") Long id);
}
